#Get-AppxPackage | Select-Object Name, PackageFamilyName, Publisher, InstallLocation | Sort-Object Name | Format-Table –AutoSize
#$PSDefaultParameterValues['Out-File:Encoding'] = 'utf8'
#$OutputEncoding = [System.Text.Encoding]::UTF8
Get-ChildItem -Path C:\ -Filter python.exe -Recurse -ErrorAction SilentlyContinue | Select-Object FullName
# 获取 PATH 环境变量并分割成数组
$paths = $env:PATH -split ';'

# 过滤掉空字符串和无效路径
$validPaths = $paths | Where-Object { $_ -match '\S' } | ForEach-Object {
    if (Test-Path $_) {
        $_
    }
}

# 输出有效路径
$validPaths | Format-Table -AutoSize